<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1>object_test Example</h1>
<script>
function Member(){ /* Member class정의*/
	
	/* 필드를 정의할 때는 반드시 this를 사용해야 함*/
	this.irum='cho';
	this.age=30;
	this.address='seoul';
	this.score=90;
	/*setter 정의*/
	this.setIrum = function(v){ this.irum=v;}
	this.setAge = function(v){this.age=v;}
	this.setAddress = function(v){this.address=v;}
	this.setScore = function(v){this.score=v;}
	/*getter정의*/
	this.getIrum = function(){return this.irum;}
	this.getAge = function(){return this.age;}
	this.getAddress = function(){return this.address;}
	this.getScore = function(){return this.score;}
	
}



var m=new Member();
document.write(m.irum);

m.setIrum('kim');
document.write("<br/>new irum:" + m.getIrum());
</script>
</body>
</html>